{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.32"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import csv\n",
    "\n",
    "with open('dataset/data/text_emotion.csv', 'r') as f:\n",
    "      reader = csv.reader(f)\n",
    "      data = list(reader)\n",
    "texts = []\n",
    "\n",
    "for i, point in enumerate(data):\n",
    "    texts.append(data[i][3])\n",
    "texts.pop(0)\n",
    "labels = []\n",
    "for i, point in enumerate(data):\n",
    "    labels.append(data[i][1])\n",
    "labels.pop(0)\n",
    "\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "text_train, text_test, label_train, label_test = train_test_split(texts, labels,test_size=0.005)\n",
    "\n",
    "from sklearn.pipeline import Pipeline\n",
    "from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer\n",
    "from sklearn.linear_model import SGDClassifier\n",
    "\n",
    "text_clf = Pipeline([('vect', CountVectorizer(stop_words='english')),\n",
    "                         ('tfidf', TfidfTransformer()),\n",
    "                         ('clf-svm',\n",
    "                          SGDClassifier(loss='hinge',penalty='l2',alpha=1e-3,max_iter=100,tol=1e-6,random_state=42)),])\n",
    "\n",
    "_ = text_clf.fit(text_train, label_train)\n",
    "\n",
    "predicted_svm = text_clf.predict(text_test)\n",
    "np.mean(predicted_svm == label_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import scrapy\n",
    "from scrapy.crawler import CrawlerProcess\n",
    "from scrapy.utils.project import get_project_settings"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "class ThingIVerseSpider(scrapy.Spider):\n",
    "    name = \"tiv_spider\"\n",
    "    start_urls = ['https://www.thingiverse.com/explore/popular']\n",
    "    \n",
    "    def parse(self, response):\n",
    "        # parse the home page\n",
    "        print(response)\n",
    "        for thing in response.css('#main > div > div > div > div.things-page-content > div.things.instances > div > div > div > a::attr(href)'):\n",
    "            url = thing.extract()\n",
    "            next_page = \"https://www.thingiverse.com\" + str(url)\n",
    "            print(\"Extracted thing: \" + next_page)\n",
    "            yield scrapy.Request(next_page, callback=self.parse_thing)\n",
    "            \n",
    "    def parse_thing(self, response):\n",
    "        # parse the item (\"thing\") page\n",
    "        text = []\n",
    "        title_selector = \"#thing-page > div:nth-child(2) > div.thing-page-header > div.thing-header-data > h1::text\"\n",
    "        title = response.css(title_selector).extract()\n",
    "        print(\"\")\n",
    "        print(title)\n",
    "        summary_selector = \"#description p::text\"\n",
    "        summary = response.css(summary_selector).extract()\n",
    "        for line in summary:\n",
    "            line_clean = line.replace('\\n', ' ').replace('\\r', ' ')\n",
    "            text.append(line_clean)\n",
    "            print(line_clean, text_clf.predict([line_clean]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:38 [scrapy.utils.log] INFO: Scrapy 1.5.0 started (bot: scrapybot)\n",
      "2018-02-05 17:45:38 [scrapy.utils.log] INFO: Versions: lxml 4.1.1.0, libxml2 2.9.7, cssselect 1.0.3, parsel 1.3.1, w3lib 1.19.0, Twisted 17.9.0, Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) - [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)], pyOpenSSL 17.5.0 (OpenSSL 1.1.0g  2 Nov 2017), cryptography 2.1.4, Platform Darwin-17.4.0-x86_64-i386-64bit\n",
      "2018-02-05 17:45:38 [scrapy.crawler] INFO: Overridden settings: {}\n",
      "2018-02-05 17:45:38 [scrapy.middleware] INFO: Enabled extensions:\n",
      "['scrapy.extensions.corestats.CoreStats',\n",
      " 'scrapy.extensions.telnet.TelnetConsole',\n",
      " 'scrapy.extensions.memusage.MemoryUsage',\n",
      " 'scrapy.extensions.logstats.LogStats']\n",
      "2018-02-05 17:45:38 [scrapy.middleware] INFO: Enabled downloader middlewares:\n",
      "['scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware',\n",
      " 'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware',\n",
      " 'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware',\n",
      " 'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware',\n",
      " 'scrapy.downloadermiddlewares.retry.RetryMiddleware',\n",
      " 'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware',\n",
      " 'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware',\n",
      " 'scrapy.downloadermiddlewares.redirect.RedirectMiddleware',\n",
      " 'scrapy.downloadermiddlewares.cookies.CookiesMiddleware',\n",
      " 'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware',\n",
      " 'scrapy.downloadermiddlewares.stats.DownloaderStats']\n",
      "2018-02-05 17:45:38 [scrapy.middleware] INFO: Enabled spider middlewares:\n",
      "['scrapy.spidermiddlewares.httperror.HttpErrorMiddleware',\n",
      " 'scrapy.spidermiddlewares.offsite.OffsiteMiddleware',\n",
      " 'scrapy.spidermiddlewares.referer.RefererMiddleware',\n",
      " 'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware',\n",
      " 'scrapy.spidermiddlewares.depth.DepthMiddleware']\n",
      "2018-02-05 17:45:38 [scrapy.middleware] INFO: Enabled item pipelines:\n",
      "[]\n",
      "2018-02-05 17:45:38 [scrapy.core.engine] INFO: Spider opened\n",
      "2018-02-05 17:45:38 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)\n",
      "2018-02-05 17:45:38 [scrapy.extensions.telnet] DEBUG: Telnet console listening on 127.0.0.1:6023\n",
      "2018-02-05 17:45:39 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/explore/popular> (referer: None)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<200 https://www.thingiverse.com/explore/popular>\n",
      "Extracted thing: https://www.thingiverse.com/thing:2676324\n",
      "Extracted thing: https://www.thingiverse.com/thing:2770388\n",
      "Extracted thing: https://www.thingiverse.com/thing:2656594\n",
      "Extracted thing: https://www.thingiverse.com/thing:2754691\n",
      "Extracted thing: https://www.thingiverse.com/thing:2744865\n",
      "Extracted thing: https://www.thingiverse.com/thing:2194278\n",
      "Extracted thing: https://www.thingiverse.com/thing:2738211\n",
      "Extracted thing: https://www.thingiverse.com/thing:2512390\n",
      "Extracted thing: https://www.thingiverse.com/thing:763622\n",
      "Extracted thing: https://www.thingiverse.com/thing:1004996\n",
      "Extracted thing: https://www.thingiverse.com/thing:2709667\n",
      "Extracted thing: https://www.thingiverse.com/thing:2403756\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:41 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:2403756> (referer: https://www.thingiverse.com/explore/popular)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "['Hand-Screw Clamp']\n",
      "This is a proof of concept of a new thread design which can make a hand-screw type clamp, commonly used in woodworking. It won't match the strength of an actual clamp, but I tried to make a clamp that was as strong as possible, with 100% 3d printed parts. For this, careful consideration needed to be made so that each part respects the grain of the 3d print. It is, however, still a 3d printed plastic clamp, so don't get too crazy with it! ['worry']\n",
      "See my process for designing this  ['neutral']\n",
      ". ['neutral']\n",
      "Print Settings: ['neutral']\n",
      "I printed everything with standard draft settings, in PLA. Through testing, I found that the small \"SlideHinge\" parts are always the first things to fail. They break off at the very tip of the end that captures the rotating knob. So if you wanted it stronger with minimal changes, you could print the \"SlideHinge\" part solid. ['neutral']\n",
      " This is tricky to assemble. The design intention wasn't to make a simple clamp. It is more of a demonstration of a 3d printed mechanism to make this special type of clamp. ['neutral']\n",
      "Also, adding some sort of wax from a candle / soap / etc. will help make clamping much smoother. ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      "Assembly video: ['neutral']\n",
      "  ['neutral']\n",
      "Watch this thing crushing stuff: ['neutral']\n",
      "  ['neutral']\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:43 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:2194278> (referer: https://www.thingiverse.com/explore/popular)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "['Modular Mounting System']\n",
      "This project is a mounting system for phones and lightweight cameras. ['neutral']\n",
      "DESIGN CONSIDERATIONS: ['neutral']\n",
      "ACHIEVED APPLICATIONS: ['worry']\n",
      "MAKING: ['neutral']\n",
      "ACKNOWLEDGEMENTS: ['neutral']\n",
      "UPDATES: ['neutral']\n",
      "NOTES: ['worry']\n",
      "This is the list to indicate which function of the mount the parts belong to. ['neutral']\n",
      " There is also a drawing made by willemjan for instruction:  ['worry']\n",
      "MOUNTING BASE - the base to attach the mount to something ['neutral']\n",
      "Clip UM2 ['worry']\n",
      " Clip 2020 profile ['worry']\n",
      " G-clamp ['neutral']\n",
      " Flat stand ['hate']\n",
      "ARMS - the foldable arms and connectors ['sadness']\n",
      "Axis change connector ['sadness']\n",
      " Arm v2 (anything) ['neutral']\n",
      " M5.0 Nut ['relief']\n",
      " M5x25 D ['neutral']\n",
      " M5 knob short ['neutral']\n",
      "PHONE CLAMP ['neutral']\n",
      "Phone clamp down grab ['sadness']\n",
      " Phone clamp up NO tab ['worry']\n",
      " Phone clamp up WITH tab ['worry']\n",
      " Phone clamp holder ['neutral']\n",
      " M5x65 D ['neutral']\n",
      " M5.0 Nut ['relief']\n",
      " M5 knob for phone ['neutral']\n",
      " M5 knob short ['neutral']\n",
      "Camera Mount ['neutral']\n",
      "Camera Mount ['neutral']\n",
      " Camera Screw ['neutral']\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:45 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:763622> (referer: https://www.thingiverse.com/explore/popular)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "['#3DBenchy - The jolly 3D printing torture-test by CreativeTools.se']\n",
      " is a 3D model designed by us at  ['love']\n",
      " specifically for testing and benchmarking 3D printers. It is a small recognisable object that you can download for free, make and share.   ['surprise']\n",
      "It is designed to 3D-print quickly and be a fun tool for calibrating your 3D printer. There is a single-part STL file for 3D printing the boat in one material, and a multi-part STL assembly to suitable for multi-material/printhead 3D printing.   ['worry']\n",
      "You can use the Smartphone Photo Studio for 3DBenchy to easily take photos and share the results of your 3D print.  ['neutral']\n",
      "If you want to get help please join the online communities below. You will find our 3D printing experts at CreativeTools and the enthusiastic maker community there.  ['sadness']\n",
      "You can visit  ['neutral']\n",
      " for more information on how to use #3DBenchy.   ['worry']\n",
      "You can also  ['neutral']\n",
      " to find more about #3DBenchy.   ['neutral']\n",
      " -  ['neutral']\n",
      " -  ['neutral']\n",
      " -  ['neutral']\n",
      " -  ['neutral']\n",
      " -  ['neutral']\n",
      " -  ['neutral']\n",
      " -  ['neutral']\n",
      " -  ['neutral']\n",
      " -  ['neutral']\n",
      " -  ['neutral']\n",
      " -  ['neutral']\n",
      "\" ['neutral']\n",
      "  ['neutral']\n",
      "3DBenchy inspired \"learning by failing\"  ['neutral']\n",
      " designed by  ['worry']\n",
      "Download it from  ['neutral']\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:46 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:2512390> (referer: https://www.thingiverse.com/explore/popular)\n",
      "2018-02-05 17:45:46 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:2738211> (referer: https://www.thingiverse.com/explore/popular)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "['3D Printing Terminology Visual Displays']\n",
      "Created this as a visual aid for newcomers to 3D printing. ['worry']\n",
      " User jpelc has generously provided 'universal gcodes' that will theoretically print on any printer but this hasn't been tested yet.  If you're interested in testing these out, please  ['neutral']\n",
      " and I can send you the gcodes.  They're available at 100%, 75% and 50% scale.   ['worry']\n",
      "                       ['neutral']\n",
      "Craftbot Plus ['neutral']\n",
      "                       ['neutral']\n",
      "Doesn't Matter ['worry']\n",
      "                       ['neutral']\n",
      "No ['neutral']\n",
      "                      ['neutral']\n",
      "--On Simplify3D > 'Separate Connected Surfaces' and create a separate process for each corresponding section ['neutral']\n",
      "--You should be able to use the latest Slic3r to achieve the same results. Once you load the STL into Slic3r, you'll want to first split the parts. Then, you'll be able to select each individual piece, right click > Settings and assign different settings to them by pressing the plus sign. ['neutral']\n",
      "--I'm still working out whether it's possible to do the same in Cura. I don't think so yet. ['worry']\n",
      "--For the Layer Height, I first printed with 1 shell but it turned out better/stronger with 2 shells.  The first try had some stringing, but adjusting the start points to the back of the print seemed to resolve that. ['worry']\n",
      "--For Bridging, I slowed the speed down to 90% and set extrusion width to 90%.  May have printed even better with a slightly slower speed/lower width. ['worry']\n",
      "\n",
      "['Flexi Rex with stronger links']\n",
      "This is another remix of Kirbs'  ['happiness']\n",
      ", based on  ['neutral']\n",
      ". Apparently the original model was made by someone else, but I don't know who. If someone knows, drop me a message. ['sadness']\n",
      " My print of the original model was not very kid-proof, one of the links broke after some rough handling. Hence I made all links more robust. This means this model can probably be printed even smaller than the original ones before the links become too weak. Of course you can also scale it up at will. ['relief']\n",
      "If you want to make a dual extrusion print like  ['enthusiasm']\n",
      " from Adafruit, check out the  ['neutral']\n",
      " by AndrewSink. ['neutral']\n",
      "                       ['neutral']\n",
      "FlashForge ['neutral']\n",
      "                       ['neutral']\n",
      "                       ['neutral']\n",
      "0.2 mm ['neutral']\n",
      "                       ['neutral']\n",
      "15% ['neutral']\n",
      "                      ['neutral']\n",
      "Printed with 3 perimeters for more strength. No supports needed. ['worry']\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:47 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:2709667> (referer: https://www.thingiverse.com/explore/popular)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "['TuneFast Harp']\n",
      "The  ['neutral']\n",
      " is a 3D printed musical instrument that uses a single-string to create an 8-note diatonic harp. ['happiness']\n",
      "The total cost with all hardware is under  ['neutral']\n",
      " and only takes around  ['neutral']\n",
      ". ['neutral']\n",
      "Hear what it sounds like with a  ['worry']\n",
      "  ['neutral']\n",
      " and with a  ['neutral']\n",
      "  ['neutral']\n",
      ". ['neutral']\n",
      " A  ['neutral']\n",
      " of the harp ( ['neutral']\n",
      ", shown below with blue PLA) has been modified from the original to include a  ['worry']\n",
      " (focusing the sound 8-10cm away from the string) and a clipped corner (to reduce total material used). Files are also included to print your own M3 washers and the final M3 spacer to reduce the parts list a bit. ['neutral']\n",
      "-- ['neutral']\n",
      "We designed the harp to be easy to assemble and fairly quick to print so that even young makers with shared resources could try it out as makerspace/classroom projects. ['neutral']\n",
      "You’ll need a handful of parts to complete this project. Everything is reasonably inexpensive, but many of the parts come in larger packs so you may want to plan to make a few and scale your quantities accordingly. ['worry']\n",
      " (for those with washers/spacers around): ['neutral']\n",
      "Our print time came out to around 3 hours total on a TAZ6 printing PLA with high speed settings and 30% infill. ['neutral']\n",
      "Generally, the harp works well printed with fairly large layer heights (i.e. coarse/fast settings), but make sure you use at least 30% infill (to increase strength) and print with stiff plastic (PLA works well; ABS is strong, but it’s significantly less stiff than PLA and that’s what we’re looking for here). ['neutral']\n",
      "After the print is complete, remove it from the print bed and clean up any defects from the print process (we didn’t really need to do anything, but your mileage may vary depending on which printer/filament you use). In particular, make sure there aren’t any extra strands or printer blobs that would interfere with the bearings. ['neutral']\n",
      "Add the 8 bearings using an M3x20mm bolt, nut, and washer (we prefer metal belleville washers, but you can even  ['neutral']\n",
      "). The washer should go between the bearing and the printed part to keep the bearing from touching and interfering with its ability to smoothly rotate. Tighten the bolt firmly, but not so tight that it causes the bearing to rub. ['worry']\n",
      "Next, add the spacer for the shortest/highest note (we don't use a bearing here because of space constraints and the minimal displacement under tension so close to the end of the string). ['neutral']\n",
      "Now, double check that each of the bearings can rotate smoothly. If there’s additional friction in any of the bearings, the string won’t be under uniform tension and thus alter the relative tuning of some of the notes. If any bearing is rubbing, just loosen it, inspect/clean any surfaces, and slowly re-tighten. ['fun']\n",
      "Then install the guitar tuner in the remaining hole. Hand tighten in place with the knob facing outward. Screw it in place from the bottom and fully tighten the nut. ['worry']\n",
      "Finally, string it up. If using a ball end string (common for electric guitar strings), just feed it through the small hole by the spacer. If using a nylon string, tie a knot in it first near the end then feed it through. ['neutral']\n",
      "Now weave the string back and forth, holding it firmly enough that it doesn’t slide off of the bearings as you go. After the last bearing, thread the string through the hole in the metal shaft of the tuner and turn the knob to tighten it in place. Bring the string just upto tension so it holds in place for tuning. Trim off any excess string that sticks out past the tuning peg so it doesn’t get in the way or poke you later. ['neutral']\n",
      "Since all of the notes are produced from a single string under constant tension, all of the notes should be relatively in tune as soon as the string is somewhat tight. By further tightening the string, all of the notes will increase in frequency, allowing it to be tuned to any desired key. ['neutral']\n",
      "Two things to keep in mind as you’re tuning: ['worry']\n",
      "Note that the harp also works well with steel strings, but they require about twice as much tension which can deform the printed part a bit more and make it trickier to play in-tune (especially when using thicker low strings). The other downside of using a metal string is that it can be pokey/dangerous when things break or things are flopping around as you string the instrument. Just work carefully and be mindful of others around you. ['neutral']\n",
      "We hope you enjoy playing this experimental single-string diatonic harp. When properly built, it produces a pleasant sound and holds its tuning quite well. ['worry']\n",
      "The TuneFast Harp is intended to be a hands-on tool for learning about how stringed instruments work as well as a springboard for designing and printing your own custom stringed objects. ['worry']\n",
      "A final note for the musically inclined that feel limited by only having 8 notes to choose from: keep in mind that you can use  ['hate']\n",
      "  ['neutral']\n",
      " to play chords that go beyond the harp's limited range. For example a G Major chord (G-B-D) can be played in the 1st inversion (B-D-G) or 2nd inversion (D-G-B) to fit within the harp. ['neutral']\n",
      "                       ['neutral']\n",
      "LulzBot ['neutral']\n",
      "                       ['neutral']\n",
      "                       ['neutral']\n",
      "No ['neutral']\n",
      "                       ['neutral']\n",
      "No ['neutral']\n",
      "                       ['neutral']\n",
      "0.38mm layer height ['neutral']\n",
      "                       ['neutral']\n",
      "30% minimum ['neutral']\n",
      "                      ['neutral']\n",
      "This is designed to print quickly, so feel free to use coarse/fast settings. Just make sure to set the infill to at least 30% to improve the rigidity of the instrument (and use stiff plastics like PLA). ['worry']\n",
      "Clean up any rough edges and make sure all holes are relatively clean. You shouldn't have to do much here, but double check before assembling. ['worry']\n",
      "This harp was designed in Fusion 360.  ['neutral']\n",
      "Tuning musical instruments can be a pain. This is especially true with instruments like pianos or harps, which can have dozens of strings (all of which slightly deform the instrument as they are tightened, affecting the other strings around them making tuning a long and tedious process). ['neutral']\n",
      "Which raises the question: can you use a single string that zig-zags back and forth to drastically reduce the number of tuners necessary in an instrument? This harp is one example of such an instrument. ['neutral']\n",
      "Learn hands-on how stringed instruments are made by printing and assembling this harp. Intuitively explore the relationships between the sounds produced and changes to string tension, string length, and string thickness. ['worry']\n",
      "Print and assemble this harp, discussing the  ['happiness']\n",
      " between the various design elements (placement of bearings, string tension, string material, etc.). ['neutral']\n",
      "Then look at edge cases and make hypotheses for questions such as: ['enthusiasm']\n",
      "Next, look at failure modes. Wearing safety glasses and gloves, tighten the string and watch what happens to the instrument as it surpasses its designed limits. Does the instrument start to bow? If so, where? Does the string break first or the instrument? ['worry']\n",
      "Finally, sketch (or fully design and print if you have the resources/knowledge) new simple stringed instruments that build on the underlying concepts of the harp but look/function differently.  ['worry']\n",
      "Some ideas for new designs might include: ['neutral']\n",
      "See the description above for the list of hardware needed to build each instrument. The total cost comes out to just under $7/harp. ['worry']\n",
      "3 hours to print, 20 minutes to assemble, 1 hour+ to play/experiment ['happiness']\n",
      "While anyone can build this instrument by printing and screwing the parts together, to understand how it was designed you'll want to consider two equations: ['worry']\n",
      "Also consider reading more details about the  ['worry']\n",
      ". ['neutral']\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:48 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:2754691> (referer: https://www.thingiverse.com/explore/popular)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "['CRE-004 Cryptic Pattern Leg Prosthesis']\n",
      "This is this is a 3D printer-based prosthesis design. Developed and designed by Agung Junianto, Industrial Product Design Department, ITS Surabaya, Indonesia. Advisor: Djoko Kuswanto, ST., M.Biotech. ['happiness']\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:48 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:2656594> (referer: https://www.thingiverse.com/explore/popular)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "['All In One 3D Printer test']\n",
      "I decided to design All In One 3D Printer test, so here it is. This test includes : support test, scale test, overhang test, hole test, diameter test and bridging test. Print this with 100% Infill without supports. Feel free to tip me! :-) ['worry']\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:49 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:2744865> (referer: https://www.thingiverse.com/explore/popular)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "['Sea Serpent']\n",
      "Sea serpent  ['neutral']\n",
      "this is developed to study Articulated tail design for dragons and snake tails as well improve ball joint's design and it's hold tension strength from rip offed from it's soket. ['worry']\n",
      "                       ['neutral']\n",
      "Doesn't Matter ['worry']\n",
      "                       ['neutral']\n",
      "Yes ['neutral']\n",
      "                       ['neutral']\n",
      "0.2 ['neutral']\n",
      "                       ['neutral']\n",
      "10% ['neutral']\n",
      "                      ['neutral']\n",
      "1) Please be careful not be confused between sets and parts, part number is not ingraved. ['worry']\n",
      "2) Body Segments without prebuilt supports are in Zip File. Please Don't chagne oriented Direction to vertically, it reasons are to protect the ball from strain under the soket and scales that may can broken off ['worry']\n",
      "3) Assemble Tail tip 02 (Flat tail fin) will need glue to put together ['worry']\n",
      "4) if you have trouble the Ball into soket, grind or shave ball's top and bottom about 1mm and try again. ['neutral']\n",
      "This snake is consist of Head(Jaw, Tung, Eye)  and body (climb up scale by 103% each which Tail set 20~21 and Climb down by scale 98% each which Tail set 22~31 and Tail Tip. ['worry']\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:50 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:2676324> (referer: https://www.thingiverse.com/explore/popular)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "['Measuring Cube']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      " Let us know  ['neutral']\n",
      " in a cube we bring to the market (holds liquids, food-safe, dishwasher-safe) in an upcoming crowdsourcing campaign.   ['worry']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      " |  ['neutral']\n",
      " | Combined Imperial and Metric | includes in-line measurements of adjacent containers | 89 mm, 3.5\" cube  ['neutral']\n",
      "  ['neutral']\n",
      ": 1 cup, 1/2 cup, 1/3 cup, 1/4 cup.  ['neutral']\n",
      ": 2 tbsp, 1 tbsp, 1/2 tbsp | in-line: 3-1/2 tbsp, 3 tbsp, 2-1/2 tbsp, 1-1/2 tbsp.  ['worry']\n",
      ": 1 tsp, 1/2 tsp, 1/4 tsp | in-line: 1-3/4 tsp, 1-1/2 tsp, 3/4 tsp.  ['worry']\n",
      ": 240 mL, 120 mL, 60 mL, 30 mL, 15 mL, 7.5 mL, 5 mL, 2.5 mL, 1.25 mL | in-line: 52.5 mL, 45 mL, 37.5 mL, 22.5 mL, 8.75 mL, 7.5 mL, 3.75 mL.  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      " |  ['neutral']\n",
      ":  ['neutral']\n",
      " 1 cup (236.588 mL), 1/2 cup, 1/3 cup, 1/4 cup, 1/8 cup, 1/4 teaspoon, 1/2 teaspoon, 1 teaspoon (4.928 mL), 1/2 tablespoon, 1 tablespoon. Size: 89 mm (3.5\") cube.  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      " |  ['neutral']\n",
      ":  ['neutral']\n",
      " 1 cup (236.588 mL), 1/2 cup, 1/3 cup, 1/4 cup, 1/5 cup, 1/4 teaspoon, 1/2 teaspoon, 1 teaspoon (4.928 mL), 1 tablespoon. Size: 90 mm (3.5\") cube.  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      " |  ['neutral']\n",
      ":  ['neutral']\n",
      " 250 mL, 125 mL, 100 mL, 75 mL, 50 mL, 1/4 teaspoon, 1/2 teaspoon, 1 teaspoon (4.928 mL), 1 tablespoon. Size: 93 mm cube.  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      ":  ['neutral']\n",
      " 1/2 cup (118.294 mL), 1/3 cup, 1/4 cup, 1/16 teaspoon, 1/8 teaspoon, 1/4 teaspoon, 1/2 teaspoon, 1 teaspoon (4.928 mL), 2 teaspoons, 1/2 tablespoon, 1 tablespoon, 2 tablespoons. Size: 76 mm (3\") cube.  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      " All containers share (within reason) common walls for the most compact shape and the minimum filament use.  ['neutral']\n",
      " How to use: fill all the way up for the correct volume for each container.  ['neutral']\n",
      " We printed at 0.1 mm layer, 12% fill, 0.2 mm layer should also be fine. Supports: NONE.  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      "Please see our popular  ['surprise']\n",
      " made from pure titanium, with the safety cage to keep your keys secure, and the built-in bottle opener. ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      "Our other  ['neutral']\n",
      ". ['neutral']\n",
      "Enjoy ['happiness']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      ": tbd, we need something solid, the winning material now is nylon, commonly used for kitchen utensils like spatulas: strong, survives heat of a dishwasher, FDA approved.  ['neutral']\n",
      "  ['neutral']\n",
      ": yes, after we reach break-even volumes in nylon.  ['empty']\n",
      "  ['neutral']\n",
      ": my personal hell, with so many definitions of the cup. Good news: the difference between the “legal” and the “customary” US cup is around 1%, so whatever we choose it shouldn’t make a big difference.   ['worry']\n",
      "  ['neutral']\n",
      "(I assume starting at 2 cups): sure, after we take care of the regular and the mini version.  ['neutral']\n",
      "  ['neutral']\n",
      ": yes, we’ll be shipping there.  ['happiness']\n",
      "  ['neutral']\n",
      ": Qui, bien sûr.  ['neutral']\n",
      "  ['neutral']\n",
      ": After it’s big brother.  ['worry']\n",
      "  ['neutral']\n",
      ": We'll offer discounts for 2, 3, 5 cubes… with the shipping cost of multiple cubes close to the cost of shipping of a single cube.  ['worry']\n",
      "  ['neutral']\n",
      ": Dishwasher safe, holds liquids, food grade, FDA safe, BPA-free... Yes, we'll work with the manufacturer to select the correct plastic injection material for food contact application.  ['relief']\n",
      "  ['neutral']\n",
      ": we'll use them exclusively to let you know when the campaign is ready.  ['happiness']\n",
      "  ['neutral']\n",
      "  ['neutral']\n",
      "The Measurement Cube is protected by US patent pending. ['neutral']\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:50 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:2770388> (referer: https://www.thingiverse.com/explore/popular)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "['Where the Sidewalk Ends']\n",
      "I have many fond memories of Shel Silversteins's writings, so I wanted to try to make the cover art in 3D. ['neutral']\n",
      "The largest part of this model is hollow to keep it lightweight.  There is a hole in the back to hang it from a nail. ['neutral']\n",
      "You will need supports for the kids and the dog.  NO supports are needed for the base. ['neutral']\n",
      "There is a place where the sidewalk ends ['worry']\n",
      " And before the street begins, ['worry']\n",
      " And there the grass grows soft and white, ['neutral']\n",
      " And there the sun burns crimson bright, ['worry']\n",
      " And there the moon-bird rests from his flight ['neutral']\n",
      " To cool in the peppermint wind. ['neutral']\n",
      "Let us leave this place where the smoke blows black ['hate']\n",
      " And the dark street winds and bends. ['worry']\n",
      " Past the pits where the asphalt flowers grow ['neutral']\n",
      " We shall walk with a walk that is measured and slow, ['worry']\n",
      " And watch where the chalk-white arrows go ['relief']\n",
      " To the place where the sidewalk ends. ['worry']\n",
      "Yes we'll walk with a walk that is measured and slow, ['worry']\n",
      " And we'll go where the chalk-white arrows go, ['relief']\n",
      " For the children, they mark, and the children, they know ['happiness']\n",
      " The place where the sidewalk ends. ['worry']\n",
      "                       ['neutral']\n",
      "Prusa ['neutral']\n",
      "                       ['neutral']\n",
      "                       ['neutral']\n",
      "No ['neutral']\n",
      "                       ['neutral']\n",
      "Yes ['neutral']\n",
      "                       ['neutral']\n",
      ".15 ['neutral']\n",
      "                       ['neutral']\n",
      "20 ['neutral']\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2018-02-05 17:45:51 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.thingiverse.com/thing:1004996> (referer: https://www.thingiverse.com/explore/popular)\n",
      "2018-02-05 17:45:52 [scrapy.core.engine] INFO: Closing spider (finished)\n",
      "2018-02-05 17:45:52 [scrapy.statscollectors] INFO: Dumping Scrapy stats:\n",
      "{'downloader/request_bytes': 5812,\n",
      " 'downloader/request_count': 13,\n",
      " 'downloader/request_method_count/GET': 13,\n",
      " 'downloader/response_bytes': 520746,\n",
      " 'downloader/response_count': 13,\n",
      " 'downloader/response_status_count/200': 13,\n",
      " 'finish_reason': 'finished',\n",
      " 'finish_time': datetime.datetime(2018, 2, 5, 9, 45, 52, 45340),\n",
      " 'log_count/DEBUG': 14,\n",
      " 'log_count/INFO': 7,\n",
      " 'memusage/max': 188313600,\n",
      " 'memusage/startup': 188309504,\n",
      " 'request_depth_max': 1,\n",
      " 'response_received_count': 13,\n",
      " 'scheduler/dequeued': 13,\n",
      " 'scheduler/dequeued/memory': 13,\n",
      " 'scheduler/enqueued': 13,\n",
      " 'scheduler/enqueued/memory': 13,\n",
      " 'start_time': datetime.datetime(2018, 2, 5, 9, 45, 38, 338541)}\n",
      "2018-02-05 17:45:52 [scrapy.core.engine] INFO: Spider closed (finished)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "['Stackable Battery Holders']\n",
      "These stackable battery holders are a design I did for Checkerboard, Ltd. and were a Quirky.com community selected design. Checkerboard gratiously allowed me to post them here on Thingiverse - if you're interested in getting them printed on a high res printer, please  ['sadness']\n",
      "   ['neutral']\n",
      "There are three sizes available. Each size has three files. Download the files for your size. I recommend printing and then hot-gluing the parts together. They are friction fit and include tabs to ensure a tight, permanent lock. ['worry']\n"
     ]
    }
   ],
   "source": [
    "process = CrawlerProcess(get_project_settings())\n",
    "process.crawl(ThingIVerseSpider)\n",
    "process.start()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
